package cn.edu.zut.hhr.service;

import cn.edu.zut.hhr.entity.Article;
import cn.edu.zut.hhr.entity.User;
import cn.edu.zut.hhr.entity.dos.Archive;
import cn.edu.zut.hhr.vo.ArticleVo;
import cn.edu.zut.hhr.vo.RestResponse;
import cn.edu.zut.hhr.vo.params.ArticleParams;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 文章表 服务类
 * </p>
 *
 * @author HHR
 * @since 2021-08-21
 */
public interface ArticleService extends IService<Article> {

    List<ArticleVo> getArticleList(int page, int count);

    List<ArticleVo> getHotArticleList(int count);

    List<ArticleVo> getNewArticleList(int lastIdx, int count);

    List<Archive> getListArchives();

    RestResponse getArticleById(int id);

    void updateMany(List<Article> list);

    RestResponse addArticle(ArticleParams article);

    RestResponse getArticleByTid(Integer tid);

    RestResponse getArticleListByTime(Integer year, Integer month,Integer page,Integer pageSize);

    RestResponse getRandomArticle(User user, int count);

    RestResponse likeArticle(long uid, long aid);

    RestResponse saveArticle(Long uid, Long aid);

    RestResponse getSaveArtByUid(Long uid, Integer page, Integer pageSize);
}
